package com.jiangxjsy.core.common;

import com.jiangxjsy.core.constant.GenderConstant;
import lombok.Getter;

/**
 * wukong-crm-master
 * 蒋胜宇
 * 2025/6/6 20:11
 */

@Getter
public enum Gender {
    UNKNOWN(GenderConstant.UNKNOWN),
    MALE(GenderConstant.MALE),
    FEMALE(GenderConstant.FEMALE);

    private final Integer gender;

    Gender(Integer gender) {
        this.gender = gender;
    }

    public static Gender valueOf(Integer gender) {
        for (Gender value : values()) {
            if (value.gender.equals(gender)) {
                return value;
            }
        }
        return UNKNOWN;
    }
}
